home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 4
/
Apprentice-Release4.iso
/
Utilities
/
Text
/
OzTeX 1.9
/
PS-files
/
geterrors.ps
< prev
next >
Wrap
Text File
|
1994-01-11
|
2KB
|
58 lines
%!
% This is a modified version of errhandler.ps.
% It displays error messages in the OzTeX window
% rather than printing them on paper.
/$brkpage where
{pop (Error handler already loaded.\r) print flush stop}
{(Downloading error handler.\r) print flush}ifelse
serverdict begin 0 exitserver
/$brkpage 32 dict def
$brkpage begin
/prnt{dup type/stringtype ne{=string cvs}if print flush}bind def
/nl{(\r) print flush}def
/=={typeprint nl}def
/typeprint{dup type dup currentdict exch known{exec}{unknowntype}ifelse}readonly def
/tprint{prnt}readonly def
/cvsprint{=string cvs tprint( )tprint}readonly def
/unknowntype{exch pop cvlit(??)tprint cvsprint}readonly def
/integertype{cvsprint}readonly def
/realtype{cvsprint}readonly def
/booleantype{cvsprint}readonly def
/operatortype{(//)tprint cvsprint}readonly def
/marktype{pop(-mark- )tprint}readonly def
/dicttype{pop(-dictionary- )tprint}readonly def
/nulltype{pop(-null- )tprint}readonly def
/filetype{pop(-filestream- )tprint}readonly def
/savetype{pop(-savelevel- )tprint}readonly def
/fonttype{pop(-fontid- )tprint}readonly def
/nametype{dup xcheck not{(/)tprint}if cvsprint}readonly def
/stringtype
{dup rcheck{(\()tprint tprint(\))tprint}{pop(-string- )tprint}ifelse
}readonly def
/arraytype
{dup rcheck{dup xcheck
{({)tprint{typeprint}forall(})tprint}
{([)tprint{typeprint}forall(])tprint}ifelse}{pop(-array- )tprint}ifelse
}readonly def
/packedarraytype
{dup rcheck{dup xcheck
{({)tprint{typeprint}forall(})tprint}
{([)tprint{typeprint}forall(])tprint}ifelse}{pop(-packedarray- )tprint}ifelse
}readonly def
/OLDhandleerror errordict /handleerror get def
end % of $brkpage
errordict/handleerror
{systemdict begin $error begin $brkpage begin newerror
{/newerror false store
vmstatus pop pop 0 ne{grestoreall}if initgraphics
(POSTSCRIPT ERROR: )prnt errorname prnt nl
(OFFENDING COMMAND: )prnt/command load prnt nl
$error/ostack known
{nl (CONTENTS OF STACK:)prnt nl $error/ostack get aload length{==}repeat}if
/newerror true store/OLDhandleerror load end end end exec}{end end end}
ifelse}
dup 0 systemdict put dup 4 $brkpage put bind readonly put